package com.example.administrator.wallet.model.bean;

/**
 * Created by Administrator on 2018/8/28 0028.
 */

public class WebSocketTodayMarketBean {

    private int id;

    private String market;

    private String open;

    private String last;

    private Double upsOrDowns;

    public WebSocketTodayMarketBean(int id,String market,String open, String last) {
        this.id = id;
        this.market = market;
        this.open = open;
        this.last = last;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getMarket() {
        return market;
    }

    public void setMarket(String market) {
        this.market = market;
    }

    public String getOpen() {
        return open;
    }

    public void setOpen(String open) {
        this.open = open;
    }

    public String getLast() {
        return last;
    }

    public void setLast(String last) {
        this.last = last;
    }

    public Double getUpsOrDowns() {
        return upsOrDowns;
    }

    public void setUpsOrDowns() {

        Double openNumber = Double.parseDouble(open);
        Double lastNumber = Double.parseDouble(last);

        this.upsOrDowns = (lastNumber-openNumber)/openNumber;
    }
}
